//index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    imgUrls: [
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1495475546883&di=6cf320420253b9d620a836c330ae5a5b&imgtype=0&src=http%3A%2F%2Fd.5857.com%2Fxgs_150428%2Fdesk_005.jpg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1495475546881&di=46c36fed2b53859a7175fa3617589a0b&imgtype=0&src=http%3A%2F%2Fwmtp.net%2Fwp-content%2Fuploads%2F2017%2F04%2F0410_sex1431_40.jpeg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1495475621857&di=83ee1f133ae71c0a013e3d65fb354230&imgtype=0&src=http%3A%2F%2Faliimg.changba.com%2Fcache%2Fphoto%2F88078311_640_640.jpg"
    ]
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
    console.log('onLoad')
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function(userInfo){
      //更新数据
      that.setData({
        userInfo:userInfo
      })
    })
  }
})
